• It is a very basic windows-based clone of the mobile game, Color Switch (Play Store and App Store). It only consists of 1 level.
• It is a colour-based puzzle where the player has to match their ball's colour to the obstacles' in order to proceed. The obstacles keep moving and rotating to make the level more challenging.
• I have implemented the entirety of the project, using Unity Engine and C#.
• The main motivation behind this project was learning. I wanted to learn how to replicate a well established game logic and mechanics. It also polished my implementation of click-based input and introduced me to particle systems in Unity.
• Implemented the click-based input system. colour puzzle elements, and the gameplay physics.
• Created the main game loop, the particle systems, and the UI/UX of the game.
if(collider.transform.tag == "color change")
{
this.transform.parent.gameObject.GetComponent<PlayerColorManager>().ChangeColor();
Destroy(collider.gameObject);
}
if(collider.tag == "hurdle")
{
this.transform.parent.gameObject.GetComponent<PlayerGameplayManager>().CheckColorWithHurdle(collider);
}
if(collider.tag == "end")
{
GameObject.FindGameObjectWithTag("end crackers").GetComponent<EndCrackers>().Diwali();
GameObject.FindGameObjectWithTag("gameplay").GetComponent<Timer>().End();
}
if(collider.tag == "star")
{
Destroy(collider.gameObject);
this.transform.parent.gameObject.GetComponent<PlayerGameplayManager>().Score();
}
Full Script (GitHub)
This snippet can be clearly improved by implementing singleton managers (PlayerColorManager, PlayerGameplayManager), this will replace the expensive lookup command. Implementing the CompareTag method instead of string comparison and caching the frequently used references will also help with efficiency and reliability.